cmake_minimum_required(VERSION 2.8.3)
project(gps_imu_fuse)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")

find_package(Eigen3 REQUIRED)

include_directories(
  include
  ${EIGEN3_INCLUDE_DIR}
  $ENV{WORK_DIR}/openlib/gps_imu_fusion/install/include
  $ENV{WORK_DIR}/openlib/GeographicLib/install/include/GeographicLib
)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  nav_msgs
)

catkin_package()

include_directories(
	include
	${catkin_INCLUDE_DIRS}
	${EIGEN3_INCLUDE_DIR}
)

file(GLOB SRCS_ROS src/*.cpp)

add_executable(${PROJECT_NAME}_node ${SRCS_ROS})

target_link_libraries(${PROJECT_NAME}_node
	${catkin_LIBRARIES}
	$ENV{WORK_DIR}/openlib/GeographicLib/install/lib/libGeographiccc.so
	$ENV{WORK_DIR}/openlib/gps_imu_fusion/install/lib/libgps_imu_fusion.so
)
